#ifndef QSTYLESHEETLIST_H
#define QSTYLESHEETLIST_H

#include <QTreeWidget>
#include <QItemDelegate>

namespace CORELIB
{

    class QStylesheetDelegate: public QItemDelegate
    {
        Q_OBJECT
    public :
        void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
        QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
    };

    class QStylesheetList : public QTreeWidget
    {
        Q_OBJECT
    public:
        explicit QStylesheetList(QWidget *parent = 0);
        void    addItem(const QString &text);
    signals:
        void    selectChanged(int index);
    public slots:
        void    clickedSlot(QTreeWidgetItem *item);
    protected:
        QList<QTreeWidgetItem*>     m_items;
        int                         m_current;
    };

}
#endif // QSTYLESHEETLIST_H
